<?php

namespace App\Admin\Extensions;

use App\Model\UserProfile;
use Encore\Admin\Admin;

class UserCoinOp extends BaseAction
{
    protected function render()
    {
        Admin::script($this->script($this->actionUrl));
        $btn = $this->buildButton('fail', '解除冻结金额', ['id' => $this->id, 'action' => 'clear_freeze']);
        $str = [];
        if ($this->row->freeze_coin > 0) {
            $str[] = $btn;
        }
        return implode('<br/><br/>', $str);
    }
}
